package com.sun.showcase.controller.app.mall;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sun.showcase.biz.mall.service.MemberLevelService;
import com.sun.showcase.client.query.mall.MemberLevelQuery;
import com.sun.showcase.pojo.DataGrid;
import com.sun.showcase.pojo.Result;

@Controller("appMemberLevelController")
@RequestMapping(value="/app/memberLevel") 
public class MemberLevelController{
	
	@Autowired
	private MemberLevelService memberLevelService;
	
	private Result result = new Result();

	/**
	 * 获得分页数据表格
	 */
	@ResponseBody
	@RequestMapping(value = "/list")
	public Result datagrid(MemberLevelQuery memberLevelQuery) {
		memberLevelQuery.setOrderColum("create_date");
		DataGrid dg = memberLevelService.datagrid(memberLevelQuery);
		result.setSuccess(true);
		result.setData(dg);
		return result;
	}
	
}
